﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace CommunitySystemModel
{
    /// <summary>
    /// 试用期满考核附件
    /// </summary>
    public class Emp_SYQMKHFJModel
    {
        private int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        private int _MainID;
        [DataMember]
        public int MainID
        {
            get { return _MainID; }
            set { _MainID = value; }
        }

        private string _Key;
        [DataMember]
        public string Key
        {
            get { return _Key; }
            set { _Key = value; }
        }

        private string _filename;
        [DataMember]
        public string filename
        {
            get { return _filename; }
            set { _filename = value; }
        }

        private string _realname;
        [DataMember]
        public string realname
        {
            get { return _realname; }
            set { _realname = value; }
        }
        private string _Status;
            [DataMember]
        public string Status
        {
            get { return _Status; }
            set { _Status = value; }
        }
            private string _FileSize;
            [DataMember]
            public string FileSize
            {
                get { return _FileSize; }
                set { _FileSize = value; }
            }
            private string _Percentage;
            [DataMember]
            public string Percentage
            {
                get { return _Percentage; }
                set { _Percentage = value; }
            }
            private string _Type;
            [DataMember]
            public string Type
            {
                get { return _Type; }
                set { _Type = value; }
            }
            public static Emp_SYQMKHFJModel FillEntity(DataRow dr)
        {
            Emp_SYQMKHFJModel right = new Emp_SYQMKHFJModel();
            if (dr.Table != null && dr.Table.Columns.Contains("MainID"))
                right.MainID = Convert.ToInt32(dr["MainID"]);
            if (dr.Table != null && dr.Table.Columns.Contains("ID")) right.ID = Convert.ToInt32(dr["ID"]);
            if (dr.Table != null && dr.Table.Columns.Contains("Key"))
                if (!string.IsNullOrEmpty(dr["Key"].ToString())) right.Key = dr["Key"].ToString();
            if (dr.Table != null && dr.Table.Columns.Contains("filename"))
                if (!string.IsNullOrEmpty(dr["filename"].ToString()))
                    right.filename = dr["filename"].ToString();
            if (dr.Table != null && dr.Table.Columns.Contains("realname"))
                if (!string.IsNullOrEmpty(dr["realname"].ToString())) right.realname = dr["realname"].ToString();

            if (dr.Table != null && dr.Table.Columns.Contains("Status"))
                if (!string.IsNullOrEmpty(dr["Status"].ToString())) right.Status = dr["Status"].ToString();
            if (dr.Table != null && dr.Table.Columns.Contains("FileSize"))
                if (!string.IsNullOrEmpty(dr["FileSize"].ToString())) right.FileSize = dr["FileSize"].ToString();
            if (dr.Table != null && dr.Table.Columns.Contains("Percentage"))
                if (!string.IsNullOrEmpty(dr["Percentage"].ToString())) right.Percentage = dr["Percentage"].ToString();
            if (dr.Table != null && dr.Table.Columns.Contains("Type"))
                if (!string.IsNullOrEmpty(dr["Type"].ToString())) right.Type = dr["Type"].ToString();
            return right;
        }
    }
}
